import java.util.ArrayList;
import java.util.Iterator;

public class Test {
    public static void func2(String str1,String str2){
        StringBuilder stringBuilder = new StringBuilder();
        for(int i = 0;i<str1.length();i++){
            char ch = str1.charAt(i);
            if(!str2.contains(String .valueOf(ch))){
                stringBuilder.append(ch);
            }
        }
        System.out.println(stringBuilder.toString());
    }
    public static void func(String str1,String str2) {
        ArrayList<Character> arrayList = new ArrayList<>();
        for(int i = 0;i<str1.length();i++){
            char ch = str1.charAt(i);
            if(!str2.contains(String.valueOf(ch))){
                arrayList.add(ch);
            }
        }
        Iterator<Character> iterator = arrayList.iterator();
        while(iterator.hasNext()){
            System.out.print(iterator.next());
        }
        System.out.println();
    }

    public static void main(String[] args) {
        func2("welcome to world!","come");
    }
}
